<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>CruiseControl.NET : CCValidator</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            CruiseControl.NET : CCValidator
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Jul 06, 2009 by <font color="#0050B2">csut017</font>.
				    </div>

				    <p>CCValidator is a GUI tool for validating the contents of a ccnet.config file. It uses the same underlying rules engine as both the service and the console to check all the rules around what is valid in the configuration.</p>

<h2><a name="CCValidator-Starting"></a>Starting</h2>

<p>To start the validator double-click on the validator short-cut under CruiseControl.Net. This will display the following window: <img src="download/attachments/25591829/Start.png" align="absmiddle" border="0"/></p>

<h2><a name="CCValidator-Validating"></a>Validating</h2>

<p>To validate a configuration file, click on <ins>F</ins>ile, then <ins>O</ins>pen..., then select the file to validate. Selecting the file will load the file and validate it: <img src="download/attachments/25591829/Validating.png" align="absmiddle" border="0"/></p>
<ul>
	<li>The display on the left shows the results of the validation. If there are any validation errors they will be displayed underneath the project or queue where the error occurred.</li>
	<li>The display on the right shows the configuration that was validated. This provides two views: original and processed.</li>
	<li>The original view is the view of the actual file. This is the config file on the file system, before any pre-processing or default values.</li>
	<li>The processed view is how CruiseControl.Net sees the file. This includes any pre-processing and default values. If there is a validation error then this view is likely to be incorrect.</li>
</ul>


<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Both views will show the full details of the configuration file, including any passwords and user names.</td></tr></table></div>

<h2><a name="CCValidator-CommandlineInterface"></a>Command-line Interface</h2>

<p>It is also possible to use CCValidator as a command-line tool.</p>

<h4><a name="CCValidator-Syntax"></a>Syntax</h4>
<p><em>CCValidator [Configuration File] [Options]</em></p>

<p>The configuration file (if used) must be the first argument.</p>

<p>The following options are available:</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Required </th>
<th class='confluenceTh'> Default </th>
<th class='confluenceTh'> Version </th>
</tr>
<tr>
<td class='confluenceTd'> -l </td>
<td class='confluenceTd'> Set the log file. This is the location where all validation messages will be written to. </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> <em>None</em> </td>
<td class='confluenceTd'> 1.4.4 </td>
</tr>
<tr>
<td class='confluenceTd'> -nui </td>
<td class='confluenceTd'> Hide the GUI interface. </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> False </td>
<td class='confluenceTd'> 1.4.4 </td>
</tr>
</tbody></table>

<h4><a name="CCValidator-Examples"></a>Examples</h4>

<p>Run the validator in GUI mode and automatically load the configuration file:<br/>
<em>CCValidator "C:\Program Files\CruiseControl.NET\Server\ccnet.config"</em></p>

<p>Run the validator without a GUI and write the messages to a log file:<br/>
<em>CCValidator "C:\Program Files\CruiseControl.NET\Server\ccnet.config" -nui -l "C:\Logs\ccnet.log"</em></p>

				    					    <br/>
                        <div class="tabletitle">
                            <a name="attachments">Attachments:</a>
                        </div>

                        <div class="greybox" align="left">
                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
                                <a href="download/attachments/25591829/Start.png">Start.png</a> (image/x-png)
                                <br/>
                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
                                <a href="download/attachments/25591829/Validating.png">Validating.png</a> (image/x-png)
                                <br/>
                                                    </div>
				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Sep 29, 2009 20:59</font></td>
		    </tr>
	    </table>
    </body>
</html>